<template>
	<view class="page-body" :class="[app.setCStyle()]">
		<view class="u-page">
			<view v-if="is_diy == 0" class="page-body">
				默认商城
			</view>
			<view v-else class="page-body" :style="{background:pageInfo.page.background}">
				<diyPage :pageInfo="pageInfo"></diyPage> 
				<!-- <a href="https://beian.miit.gov.cn/" target="_blank" style="text-align: center;color: #BCBCBC;font-size: 13px;text-decoration:none;display: block;margin-top:10px">粤B2-20****59-1</a> -->
				<!-- <a href="https://beian.miit.gov.cn/" target="_blank" style="text-align: center;color: #BCBCBC;font-size: 13px;text-decoration:none;display: block;">备案号：粤公网安备 粤ICP备2023108683号-1</a><br> -->
				
			</view>
		</view>
		<tabbar :_current="0" :getCartNum="0"></tabbar>
	</view>
	
	

</template>


<script>
	import tabbar from '@/pages/shop/tabbar';
	import diyPage from '@/pages/shop/index/diyPage/index';
	export default {
		components: {
			tabbar,
			diyPage
		},
		data() {
			return {
				is_diy: -1,
				pageInfo: {
					page: {}
				}
			};
		},
		onLoad(options) {
			this.loadData();
		},
		onShow(){
		},
		onHide(){
		},
		watch: {},
		computed: {},
		methods: {
			//请求数据
			async loadData() {
				this.$u.post('shop/api.Index/getIndexInfo').then(res => {
					this.is_diy = res.data.is_diy;
					this.pageInfo = res.data.page;
					uni.setNavigationBarTitle({
						title:this.pageInfo.page.title
					})
					//console.log(this.pageInfo);
				})
			},
		}
	}
</script>

<style lang='scss'>
</style>
